shell脚本
#!/bin/bash
dt=`date -d '-1 day' +"%Y-%m-%d"`
hive -hivevar dt=$dt -f /root/full_dim_aml_customer.sql > /user/hive/warehouse/dwd.db/dim_aml_customer
hive -hivevar dt=$dt -f /root/full_dim_aml_rule.sql > /user/hive/warehouse/dwd.db/dim_aml_rule
hive -hivevar dt=$dt -f /root/full_dim_aml_account.sql > /user/hive/warehouse/dwd.db/dim_aml_account
hive -hivevar dt=$dt -f /root/inc_dim_aml_watchlist.sql > /user/hive/warehouse/dwd.db/dim_aml_watchlist
hive -hivevar dt=$dt -f /root/inc_fact_aml_alert.sql > /user/hive/warehouse/dwd.db/fact_aml_alert
hive -hivevar dt=$dt -f /root/inc_fact_aml_report.sql > /user/hive/warehouse/dwd.db/fact_aml_report
hive -hivevar dt=$dt -f /root/inc_fact_aml_screening.sql > /user/hive/warehouse/dwd.db/fact_aml_screening
hive -hivevar dt=$dt -f /root/inc_fact_aml_transaction.sql > /user/hive/warehouse/dwd.db/fact_aml_transaction
echo "所有增量ETL任务执行完成"